using UnityEngine;
using System.Collections;

public class TrashZone : MonoBehaviour {
	
	GameManager gameManager;

	void Awake ()
	{
		gameManager = (GameManager)GameObject.Find ("GameManager").GetComponent<GameManager> ();
	}
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		//collider.
	}
	
	
	void OnTriggerEnter(Collider other) {
		Debug.Log("Trigger Enter TrashZone Zone");
		if(!other.tag.Equals("slab")) {
			gameManager.slabZoneList.Add(other.gameObject);
		}
    }
	
	void OnTriggerExit(Collider other) {
		Debug.Log("Trigger EXIT TrashZone Zone");
		if(!other.tag.Equals("slab")) {
			gameManager.slabZoneList.Remove(other.gameObject);
		}
    }
	
}
